package it.eng.area118.mdocommon.geolocation;

/**
 * 
 * @author Luigi Bifulco
 * 
 */
public interface Geolocation {

	public final static String GEOLOCATION_SERVICE = "GEOLOCATION_SERVICE";

	/**
	 * Start the geolocation service retriveing its best provider return true if
	 * all was started correctly
	 */
	public boolean start();

	/**
	 * Stop the geolocation service and all instance and providers and related
	 * objects will be destroyed
	 * 
	 * @return true if all is destroyed correctly
	 */
	public boolean stop();

	/**
	 * Return the last best estimated location
	 * 
	 * @return
	 */
	public GpsLocation getLocation();

	/**
	 * 
	 * @param callback
	 *            the callback to be passed to listen the locations
	 */
	public void watchForLocation(GeolocationCallback callback);

	/**
	 * 
	 * @param listener
	 */
	public void addGpsStatusListener(GpsStatusListener listener);

	/**
	 * 
	 * @param callback
	 * @return
	 */
	boolean removeWatcher(GeolocationCallback callback);

	/**
	 * 
	 * @return
	 */
	public boolean isActive();

}
